<?php
class Bread
{
	var $html;
	var $prevurl;
	var $currenturl;
	
	function Bread() 
	{
		$this->html		= "<ul><li class='first'><a href='/'>Start</a><!-- add --></li></ul>";
		$this->currenturl = "/";
	}
	
	function Add($title,$url) 
	{
		$this->prevurl = $this->currenturl;
		$this->currenturl = $this->currenturl.$url."/";
		$this->html = str_replace("<!-- add -->", "<ul><li><a href='".$this->currenturl."'>".$title."</a><!-- add --></li></ul>",$this->html);
		
	}
	
	function getBread() 
	{
		$this->html = str_replace("<!-- add -->", "",$this->html);

		return $this->html;
	}
	function getUrl()
	{
		return $this->currenturl;
	}
}
?>